package com.tangyuan.video.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tangyuan.model.VideoComment;
import com.tangyuan.vo.VideoCommentVo;
import com.tangyuan.vo.VideoReplayCommentVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface VideoCommentMapper  extends BaseMapper<VideoComment> {
    void saveVideoComment( VideoComment videoComment);

    List<VideoCommentVo> selectCommentByVideoId(Long videoId);

    List<VideoReplayCommentVo> selectReplayCommentByCommentId(Long videoId);

    void addCommentThumpById(Long id);

    void removeCommentThumpById(Long id);

    void saveTrumpInfo(@Param("userId") Long userId, @Param("id") Long id);

    void removeTrumpInfo(@Param("userId") Long userId, @Param("id") Long id);

    void disLike(@Param("userId") Long userId, @Param("id") Long id);

    void removeDisLike(@Param("userId") Long userId, @Param("id") Long id);

    Long findAllCommentCount(Long videoId);

    List<VideoCommentVo> findTwoComment(@Param("videoId")Long videoId,@Param("commentIds") List<Long> commentIds);

    void deleteByVideoId(Long videoId);
}
